import request from '@/utils/request'

// 查询试验数据设置主表列表
export function listDataBase(query) {
  return request({
    url: '/sycs/dataBase/list',
    method: 'get',
    params: query
  })
}

// 查询试验数据设置主表详细
export function getDataBase(bsId) {
  return request({
    url: '/sycs/dataBase/' + bsId,
    method: 'get'
  })
}

// 查询依据主表
export function getSyYj(bsId) {
  return request({
    url: '/base/syYj/' + bsId,
    method: 'get'
  })
}

// 查询水密明细
export function getDetailWater(bsId) {
  return request({
    url: '/sycs/dataDetailWater/' + bsId,
    method: 'get'
  })
}

// 查询水银明细
export function getDetailSy(bsId) {
  return request({
    url: '/sycs/dataDetailSy/' + bsId,
    method: 'get'
  })
}

// 查询钢筋明细
export function getDetailGj(bsId) {
  return request({
    url: '/sycs/dataDetailGj/' + bsId,
    method: 'get'
  })
}

// 查询明细
export function getDetail(bsId) {
  return request({
    url: '/sycs/dataDetail/' + bsId,
    method: 'get'
  })
}

// 新增试验数据设置主表
export function addDataBase(data) {
  return request({
    url: '/sycs/dataBase',
    method: 'post',
    data: data
  })
}

// 试验依据新增
export function addSyYj(data) {
  return request({
    url: '/base/syYj',
    method: 'post',
    data: data
  })
}

// 水密新增
export function addDetailWater(data) {
  return request({
    url: '/sycs/dataDetailWater',
    method: 'post',
    data: data
  })
}

// 水银明细新增
export function addDetailSy(data) {
  return request({
    url: '/sycs/dataDetailSy',
    method: 'post',
    data: data
  })
}

// 水银钢筋新增
export function addDetailGj(data) {
  return request({
    url: '/sycs/dataDetailGj',
    method: 'post',
    data: data
  })
}

// 依据明细新增
export function addDetail(data) {
  return request({
    url: '/sycs/dataDetail',
    method: 'post',
    data: data
  })
}

// 修改试验数据设置主表
export function updateDataBase(data) {
  return request({
    url: '/sycs/dataBase',
    method: 'put',
    data: data
  })
}

// 试验依据修改
export function updateSyYj(data) {
  return request({
    url: '/base/syYj',
    method: 'put',
    data: data
  })
}

// 删除试验数据设置主表
export function delDataBase(bsId) {
  return request({
    url: '/sycs/dataBase/' + bsId,
    method: 'delete'
  })
}

// 水的密度对应明细修改
export function updateDetailWater(data) {
  return request({
    url: '/sycs/dataDetailWater',
    method: 'put',
    data: data
  })
}

// 水银对应明细修改
export function updateDetailSy(data) {
  return request({
    url: '/sycs/dataDetailSy',
    method: 'put',
    data: data
  })
}

// 钢筋对应明细修改
export function updateDetailGj(data) {
  return request({
    url: '/sycs/dataDetailGj',
    method: 'put',
    data: data
  })
}

// 依据明细修改
export function updateDetail(data) {
  return request({
    url: '/sycs/dataDetail',
    method: 'put',
    data: data
  })
}

// 删除
export function handleDeleteLeaf2(bsId) {
  return request({
    url: '/base/syYj/' + bsId,
    method: 'delete'
  })
}

// 删除水密
export function handleDeleteDetailWater(bsId) {
  return request({
    url: '/sycs/dataDetailWater/' + bsId,
    method: 'delete'
  })
}

// 删除水银
export function handleDeleteDetailSy(bsId) {
  return request({
    url: '/sycs/dataDetailSy/' + bsId,
    method: 'delete'
  })
}

// 删除钢筋
export function handleDeleteDetailGj(bsId) {
  return request({
    url: '/sycs/dataDetailGj/' + bsId,
    method: 'delete'
  })
}

// 删除
export function handleDeleteDetail(bsId) {
  return request({
    url: '/sycs/dataDetail/' + bsId,
    method: 'delete'
  })
}

// 查询试验类型树
export function syTpyeTree(data) {
  return request({
    url: '/base/syYj/yjTree',
    method: 'get',
    params: data
  })
}

// 查询试验类型明细
export function listBySyTypeId(params) {
  return request({
    url: '/base/syYj/listByYjId',
    method: 'get',
    params: params
  })
}



